-- GENERATED SPELL FOR [Ravenclaw Servant] --


function spell0_1868(pUnit, Event) --@Curse of Agony,n/a--
pUnit:FullCastSpellOnTarget(980,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1868', 24000, 1)
end

function spell1_1868(pUnit, Event) --@Soul Siphon,Drain--
pUnit:FullCastSpellOnTarget(7290,pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent('Sorts_1868', 10000, 1)
end

function Sorts_1868(pUnit, Event)
local choix_sorts_1868 = math.random(0, 1)
if choix_sorts_1868 == 0 then
pUnit:RegisterEvent('spell0_1868', 1, 1)
end
if choix_sorts_1868 == 1 then
pUnit:RegisterEvent('spell1_1868', 1, 1)
end
end

function mob1868_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1868', math.random(1500, 3000), 1)
end

function mob1868_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1868_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1868_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1868, 1, 'mob1868_Action')
RegisterUnitEvent(1868, 2, 'mob1868_Leave')
RegisterUnitEvent(1868, 3, 'mob1868_Kill')
RegisterUnitEvent(1868, 4, 'mob1868_Die')
